function AhxuUploadUtils(id,refreshTime,divId){
	this.id=id;
	this.refreshTime=refreshTime;
	this.divId=divId;

}
XmlLoadReadyStateListener.prototype={
	onUploadFormSubmit:function(formId,width,height,url){
			winstyle = "dialogWidth="+width+"px; dialogHeight:"+height+"px; center:yes";
			window.showModelessDialog(url,window,winstyle);
	
	}
}









var ahxu_process=null;
var ahxu_iframe=null;
function loadProcess(url,id){
	ahxu_process=new Process();
	createIframe(url,id);
}
function Process(){
	
	this.onInited=function (pid){
		if(typeof(process_inited)=="function") return eval("process_inited('"+pid+"');");
	}
	this.onReady=function (pid,title,info){
		if(typeof(process_ready)=="function") return eval("process_ready('"+pid+"','"+title+"','"+info+"');");
	}
	this.onStarted=function (pid,title,info){
		if(typeof(process_started)=="function") return eval("process_started('"+pid+"','"+title+"','"+info+"');");
	}
	this.onDoing=function (pid,title,info){
		if(typeof(process_doing)=="function") return eval("process_doing('"+pid+"','"+title+"','"+info+"');");
	}
	this.onError=function (pid,title,info){
		if(typeof(process_error)=="function") return eval("process_error('"+pid+"','"+title+"','"+info+"');");
	}
	this.onEnd=function (pid,title,info,success){
		if(typeof(process_end)=="function") return eval("process_end('"+pid+"','"+title+"','"+info+"',"+success+");");
	}
	this.onException=function (pid,title,info){
		if(typeof(process_exception)=="function") return eval("process_exception('"+pid+"','"+title+"','"+info+"');");
	}

}

function createIframe(url,id) {
	if (!document.createElement) {return true};
	var nowTime=new Date();
	var IFrameDoc;
	var URL=url+"?pid="+id+"&rd="+nowTime.getTime();
  if (!ahxu_iframe && document.createElement) {
    // create the IFrame and assign a reference to the
    // object to our global variable IFrameObj.
    // this will only happen the first time 
    // callToServer() is called
   try {
      var tempIFrame=document.createElement('iframe');
      tempIFrame.setAttribute('id','ahxu_iframe');
      tempIFrame.style.border='0px';
      tempIFrame.style.width='0px';
      tempIFrame.style.height='0px';
      ahxu_iframe = document.body.appendChild(tempIFrame);
      
      if (document.frames) {
        // this is for IE5 Mac, because it will only
        // allow access to the document object
        // of the IFrame if we access it through
        // the document.frames array
        ahxu_iframe = document.frames['ahxu_iframe'];
      }
    } catch(exception) {
      // This is for IE5 PC, which does not allow dynamic creation
      // and manipulation of an iframe object. Instead, we'll fake
      // it up by creating our own objects.
      iframeHTML='\<iframe id="ahxu_iframe" style="';
      iframeHTML+='border:0px;';
      iframeHTML+='width:0px;';
      iframeHTML+='height:0px;';
      iframeHTML+='"><\/iframe>';
      document.body.innerHTML+=iframeHTML;
      ahxu_iframe = new Object();
      ahxu_iframe.document = new Object();
      ahxu_iframe.document.location = new Object();
      ahxu_iframe.document.location.iframe = document.getElementById('ahxu_iframe');
      ahxu_iframe.document.location.replace = function(location) {
        this.iframe.src = location;
      }
    }
  }
  
  if (ahxu_iframe.contentWindow) {
    // For IE5.5 and IE6
    IFrameDoc = ahxu_iframe.contentWindow.document;
  } else if (ahxu_iframe.document) {
    // For IE5
    IFrameDoc = ahxu_iframe.document;
  } else {
    return true;
  }
  
  IFrameDoc.location.replace(URL);
  

}

